package com.cnap.model.strategy.scale;

import cn.hutool.core.util.IdUtil;
import com.cnap.db.entity.ScaleStrategyPO;

/**
 * 通用扩缩容策略
 *
 * @author xc
 **/
public class CommonScaleDTO {
    private String svcId;
    private String strategyName;
    private String scaleType;
    private String params;

    /**
     * get
     *
     * @return SvcId
     */
    public String getSvcId() {
        return svcId;
    }

    /**
     * set
     *
     * @param svcId svcId
     */
    public void setSvcId(String svcId) {
        this.svcId = svcId;
    }

    /**
     * get
     *
     * @return StrategyName
     */
    public String getStrategyName() {
        return strategyName;
    }

    /**
     * set
     *
     * @param strategyName strategyName
     */
    public void setStrategyName(String strategyName) {
        this.strategyName = strategyName;
    }

    /**
     * get
     *
     * @return ScaleType
     */
    public String getScaleType() {
        return scaleType;
    }

    /**
     * set
     *
     * @param scaleType scaleType
     */
    public void setScaleType(String scaleType) {
        this.scaleType = scaleType;
    }

    /**
     * get
     *
     * @return Params
     */
    public String getParams() {
        return params;
    }

    /**
     * set
     *
     * @param params params
     */
    public void setParams(String params) {
        this.params = params;
    }

    /**
     * 转换成po
     *
     * @return 结果
     */
    public ScaleStrategyPO toPO() {
        ScaleStrategyPO po = new ScaleStrategyPO();
        po.setId(IdUtil.simpleUUID());
        po.setServiceId(this.svcId);
        po.setStrategyParam(this.params);
        po.setScaleType(this.scaleType);
        po.setStrategyName(this.strategyName);
        return po;
    }
}
